home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
005
/
multreg.arc
/
MULTREG.DOC
< prev
Wrap
Text File
|
1987-02-09
|
12KB
|
268 lines
T U R B O R E G R E S S I O N
M U L T R E G . C O M
---------------------
MULTREG.COM is a public domain program written by :
L. R. Holliday
Vista Chemical Company
P. O. Box 500
Ponca City, Okla. 74602
(405) 767-6326
Copies of this program are not to be sold for profit. The program may be
copied freely. USERS assume all risks when using this program.
MULTREG.COM is an interactive linear multiple regression program for the
IBM PC. It runs under DOS Version 2.0 or higher. The program performs
calculations similar to the MICROSTAT linear multiple regression program,
but does not include all of the options and capabilities of MICROSTAT. The
program is a modified version of a purchased program -- Turbo Regression
Plus. The licensing agreement allows me to distribute copies of the
compiled version of the program, but not the source code. If any problems
are encountered in using the program, please contact the above.
MULTREG can handle up to 100 data points, and can read in values for up to
10 variables for each data point. The last variable read in is always the
dependent variable, and there can be up to 9 independent variables. These
limitations are due to the size of an array within the program. The size of
the array can be increased, if needed, but the program would have to be
re-compiled. Alternate data sets can be chosen without exiting from the
program, and the calculations can be repeated as many times as desired
without exiting from the program.
Data Input
----------
The program reads text (ASCII) data files. The first line of the data file
must contain the names of the variables, separated from each other by at
least one blank. The variable names may contain any alphabetic or numeric
characters, except embedded blanks. Subsequent lines of the data set
contain the actual data values, with the values separated from each other
by at least one blank. Each line should contain the same number of values
as the number of variable names in the first line. A blank line will be
read as a line containing missing values, so blank lines are acceptable.
Missing values are indicated by any line having fewer values than the
number of variable names read from the first line. Lines containing too
many values will also be excluded, on the assumption that the line contains
a typing error. All values will be read as real values, so it is not
necessary to enter decimal points for whole number values. However, the
progam reads the data in free format, so decimal points MUST be entered for
values having a fractional part. A zero value can be indicated by 0 or a
decimal point.
A sample data file (MULTREG.DAT) is included with the program to
illustrate the data file format.
A text data file can be created using any text editing program, such as
EDLIN or the Turbo Pascal compiler. The data must be in text form, with one
line for each data point, and no line numbers. Each value must be separated
from the previous value by at least one blank (several blanks are suggested
to improve readability of the data file). Lotus 1-2-3 provides an
especially useful means for creating a data set, especially if some of the
independent variables are transformed forms ( logs, inverses, squares, etc.)
of other independent variables. Once the data and variable names have
been entered into a Lotus file, Lotus can be used to generate an
unformatted .PRN file of the data. PRN files are ASCII files. The .PRN
file must be unformatted to prevent page breaks, borders and margins from
being included in the data file.
Input to the program has been "bullet-proofed" to a great extent. However,
the program can be made to abort by having erroneous data in the data file.
For example, if the data set has an alphabetic character where the program
is expecting a numeric value, the program will abort. Also, if the data set
contains more than 10 variable values in any line, the program will abort.
RUNNING TURBO REGRESSION.
Once you have prepared a data file you are ready to run Turbo Regression.
From the DOS prompt, simply type MULTREG, and the program will begin
execution. When the program begins you will see a menu screen that allows
you several options. First, you can select the F levels for inclusion and
deletion in the regression. Second, you can select an input file (or select
a new input file, if one is already selected). Next you can select to send
your output to the screen, to the printer or to a disk file. If you select
a disk file, you must enter a name for the file in the next space on the
menu. Lastly, you can select to have a printed output of the variables
being read into the regression. The menu screen is illustrated below. The
user does not have to enter a response to any of these prompts, if the
default value is acceptable.
T U R B O R E G R E S S I O N
F Level for Inclusion: 3.0
F Level for Deletion: 3.0
Name of Data File: ░░░░░░░░░░░░░░░
Output to P)rinter, S)creen, F)ile: S
Name of Output File:
Print List of Observations (Y/N)? N
Press F10 to Continue...
When you have answered the prompts appropriately, press the F10 key and
Turbo Regression begins. If you made any mistakes in answering the prompts,
the program will not leave the options menu. If your output is to the
screen, you can move from screen to screen by pressing the return key. If
you want to scroll the information on a screen, use the cursor control keys
on the numeric pad. You can end the program at almost any time by pressing
Esc.
When Turbo Regression begins, a screen display will be provided to alert
the user to the progress of reading the data file. This display is
illustrated below.
Reading File x:filename.ext . . . . .
Number of Variables: XX
Cases Read: XX
Cases Included: XX
ERROR -- LINE CONTAINED TOO FEW VARIABLES
ERROR -- LINE CONTAINED TOO MANY VARIABLES
Note that the two error messages will only appear if these errors occur in
reading the data file. When the data file has been successfully read, a
prompt will appear at the bottom of the screen display shown above:
DO YOU WANT TO LIST THE DATA ON THE SCREEN (Y/N) ?
Answering Y to this prompt will cause all of the data read to be displayed
on the screen, one screenful at a time. Answering N (or carriage return)
will cause the program to go on to the next display. The user can select
printer output of the data read in, screen display, or both.
If you selected to print the list of data, the screen will blank and the
following message will be displayed:
PRINTING LIST OF OBSERVATIONS . . . . . .
The list of observations will be be printed in draft mode if there were six
variables or less. If there were more than six variables, the list will be
printed in condensed print mode (if your printer uses the same control
codes as an Epson printer). After printing the list, the printer will be
returned to draft mode.
The next display is a display of general information -- a review of the
selections made by the user and the data read in. This display is
illustrated below.
S T E P W I S E R E G R E S S I O N
--------------------------------------
Number of observations: XX
Number of variables: XX
Dependent variable is: var_name
Data File is: filename.ext
Cases Read: XX
Cases Included: XX
F-to-Include: XX.XXXX
F-to-Exclude: XX.XXXX
Press RETURN to continue...
If printer output was selected in the entry menu, the screen will blank,
the display shown above will be printed, and the following message will be
displayed:
PRINTING GENERAL INFORMATION . . . . . . .
The next display is a display of summary statistics. This display is
illustrated below.
S U M M A R Y S T A T I S T I C S
------------------------------------
Correlation with
Variable Arithmetic Mean Std. Deviation Ind_variable
-------- ----------------- ----------------- -------------------
Var1 xx.xxxxxx xx.xxxxxx x.xxxxxx
Var2 xx.xxxxxx xx.xxxxxx x.xxxxxx
Var3 xx.xxxxxx xx.xxxxxx x.xxxxxx
|
|
|
Use Keypad to Scroll - Return to Continue - Esc to Quit
If the summary statistics display is longer than one screenful (not
likely), the cursor keys can be used to review the display.
If printer output was selected in the entry menu, the screen will blank,
the display shown above will be printed, and the following message will be
displayed:
PRINTING SUMMARY STATISTICS . . . . . . .
Following the summary statistics display, the screen will blank and the
following prompt will be displayed:
DO YOU WANT TO DISPLAY THE CORRELATION MATRIX (Y/N) ?
If you answer Y, the correlation matrix will be displayed on the screen (or
printed on the printer if printer output was selected). This display will
usually be longer than one screenful, but all of the display can be viewed
by using the cursor keys. If you answer N (or carriage return), both the
screen display and the printout of the correlation matrix will be skipped.
If you answer Y to the correlation matrix prompt, and printer output was
selected in the entry menu, the screen will blank, the correlation matrix
display will be printed, and the following message will be displayed:
PRINTING CORRELATION MATRIX . . . . . . .
The final display is a display of regression steps. Each step of the
stepwise regression occupies one screen. If the information exceeds the
screen size, the cursor keys can be used to view the whole display. The
program will not move on to the next step until you press RETURN (unless
printer output was selected). If printer output was selected, the program
prints all of the regression steps while displaying the following message:
PRINTING REGRESSION ANALYSIS RESULTS . . . .
When the program completes the regression analysis, it returns to the entry
menu, with the name of the input file just processed displayed on the Name
of Data File line. If you want to process the same file again, with
different parameters (changed F test values, or printer output on, for
example) then make the appropriate changes on the appropriate lines, and
then press F10. If you want to process a different data file, move the
cursor to the Name of Data File line, enter the new data file name, make
any other changes desired, and then press F10. If you want to exit from the
program, press Esc.
hese errors occur in
reading the data file. When the data file has been successfully read, a
prompt will a